#ifndef __UART_DEV_GETCHAR__UART_DEV_GETCHAR_H__
#define __UART_DEV_GETCHAR__UART_DEV_GETCHAR_H__

#include <public/config.h>
#include <public/basic_types.h>

#ifdef CONFIG_ARCH_SPARC

#ifndef SGI_UART_REGISTER
#define SGI_UART_REGISTER(reg) *(volatile uint32_t *)(CONFIG_UART_DEV_GETCHAR_SWR_UART_BASE_ADDR_A + reg)

#endif

#ifndef SSI_UART_REGISTER
#define SSI_UART_REGISTER(reg) *(volatile uint32_t *)(CONFIG_UART_DEV_GETCHAR_SWR_UART_BASE_ADDR_B + reg)

#endif
#endif


#ifdef CONFIG_ARCH_IA32
#define UART_REGISTER(reg) *(volatile unsigned char *)(CONFIG_UART_DEV_GETCHAR_SWR_UART_BASE_ADDR + reg)


#endif

/*
 * \brief get a character form a device
 *
 * \param pchar pointer where the character will be copied
 */
void uart_dev_getchar(uint8_t * car);

uint8_t sgi_uart_getchar();
uint8_t ssi_uart_getchar();


#endif
